Method and apparatus for quickly generating natural terrain

ABSTRACT

A method and apparatus for quickly generating a natural terrain. The method according to an exemplary embodiment may include generating a new terrain through a patch-based synthesis from one or more virtual noise-based terrain models and one or more realistic terrain models; and processing blending of a boundary between synthesized terrains in the newly generated terrain.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application claims the benefit under 35 U.S.C. §119(a) of KoreanPatent Application No. 10-2014-0031207, filed on Mar. 17, 2014, in theKorean Intellectual Property Office, the entire disclosure of which isincorporated herein by reference for all purposes.

BACKGROUND

1. Field

The following description relates to a digital content production andgraphics processing technology, and more specifically, to a technologyof quickly generating a natural terrain.

2. Description of the Related Art

The space expressed in movies, games, and education content isincreasing. However, manually producing a large-scale terrain requiredin the content is not desirable because a production period becomeslonger. In addition, although a background of a content mostly requiresa realistic expression possible in reality even in a virtual space, theproduction period becomes longer for a more realistic background if itis produced manually, which is also not desirable. Thus, a method forreducing the production period and generating a terrain of high qualitywith high reality is required.

To reduce a period required for the terrain generation, a minimum manualproduction and an automated generation by a computer are required. Theautomated generation method may need to be designed to generate anatural terrain.

One method of the automated terrain generation is a procedural terraingeneration technology. This technology is for generating a complexterrain by repeatedly applying certain rules or methods. Morespecifically, a noise-based terrain generation method, such as a Perlinor fractal method, is used. However, while such a procedural terraingeneration method has an advantage in easily generating a terrain with aminimum rule generation, it has disadvantages in that there aredifficulties in generating the terrain in a direction a user intends andthat the generated terrain has high reality locally but is differentfrom reality globally.

Another automated terrain generation method is a technology using adigital elevation model (hereinafter referred to as DEM). The DEM isimage data extracted from a contour, an aerial photograph, and asatellite image, etc., and expresses an altitude of the given area. TheDEM is extracted from a terrain in the real world, which is veryrealistic. However, there is no DEM existing that expresses a virtualterrain according to an exact user intention. While, as mentionedpreviously, various methods of automating the terrain generation andincreasing the reality exist, the methods have nonmutual advantages anddisadvantages.

SUMMARY

The following description relates to a method and apparatus for quicklygenerating a natural terrain.

In one general aspect, a method of generating terrain includes:generating a new terrain through a patch-based synthesis from one ormore virtual noise-based terrain models and one or more realisticterrain models; and processing blending of a boundary betweensynthesized terrains in the newly generated terrain.

In another general aspect, an apparatus of processing a terrainincludes: a first database to store one or more virtual noise-basedterrain models; a second database to store one or more realistic terrainmodels; a terrain synthesizer to select a noise-based terrain model fromthe first database, select the realistic terrain model from the seconddatabase, and generate a new terrain through a patch-based synthesisfrom the selected terrain models; and a blending processor to processblending of a boundary between synthesized terrains in the newlygenerated terrain.

Other features and aspects may be apparent from the following detaileddescription, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart illustrating a method of generating a terrainaccording to an exemplary embodiment.

FIG. 2 is a diagram illustrating an example of a virtual noise-basedterrain model.

FIG. 3 is a diagram illustrating an example of a realistic terrainmodel.

FIG. 4 is a diagram illustrating an example of a new terrain generationprocess using patch-based texture synthesis.

FIG. 5 is a diagram illustrating an example of a process of blending anawkward area regarding a synthesized terrain model.

FIGS. 6 and 7 are diagrams illustrating examples of a process ofgenerating a new terrain by using multiple terrains.

FIG. 8 is a diagram illustrating an example of a calculation speedimprovement through a parallelization process.

FIG. 9 is a diagram illustrating an apparatus of processing a terrainaccording to an exemplary embodiment.

Throughout the drawings and the detailed description, unless otherwisedescribed, the same drawing reference numerals will be understood torefer to the same elements, features, and structures. The relative sizeand depiction of these elements may be exaggerated for clarity,illustration, and convenience.

DETAILED DESCRIPTION

The following description is provided to assist the reader in gaining acomprehensive understanding of the methods, apparatuses, and/or systemsdescribed herein. Accordingly, various changes, modifications, andequivalents of the methods, apparatuses, and/or systems described hereinwill be suggested to those of ordinary skill in the art. Also,descriptions of well-known functions and constructions may be omittedfor increased clarity and conciseness.

FIG. 1 is a flowchart illustrating a method of generating a terrainaccording to an exemplary embodiment.

Exemplary embodiments relate to a technology of generating a new terrainby synthesizing multiple terrains, such as a noise-based terrain modeland a realistic terrain model, etc., a technology of generating anatural terrain by processing blending of an awkward area regarding asynthesized terrain model, and a technology of shortening a processingspeed by parallelizing processes of calculating a minimum error in aprocess of generating a new terrain.

Referring to FIG. 1, an apparatus of processing a terrain according toan exemplary embodiment selects single or multiple terrain models from anoise-based terrain model and a realistic terrain model, and synthesizesthe selected terrain model in 100. Subsequently, the apparatus finds atarget to be blended, e.g., an awkward area at a boundary between theterrains, in the synthesized terrain model in 110. Then, the apparatusprocesses the blending of the found area in 120 to thereby transform theterrain and complete a generation of the new terrain in 130. Examples ofthe noise-based terrain model and the realistic terrain model aredescribed later with reference to FIGS. 2 and 3; the process 100 ofsynthesizing a terrain model are described later with reference to FIGS.4, 6, and 7; and the processing 120 of the blending is described laterwith reference to FIG. 5.

FIG. 2 is a diagram illustrating an example of a virtual noise-basedterrain model; and FIG. 3 is a diagram illustrating an example of arealistic terrain model.

Referring to FIGS. 2 and 3, not only a virtual noise-based terrain butalso a real terrain data is used to generate a new terrain with variouscharacteristics where a user intention is reflected. The virtualnoise-based terrain model may be, for example, a Perlin or fractalterrain model. The real terrain model may be a digital elevation model(hereinafter referred to as DEM); however, its exemplary embodiment isnot limited thereto.

FIG. 4 is a diagram illustrating an example of a new terrain generationprocess using patch-based texture synthesis.

Referring to FIG. 4, a user selects single or multiple terrain modelsfrom a database and synthesizes the selected terrain models to generatea new terrain. Here, a terrain, where various expressions are possible,is generated by using not only a virtual noise-based terrain but also isrealistic terrain data to generate a terrain with variouscharacteristics where a user intention is reflected.

A method of generating a terrain suggested in the present disclosure isto generate various terrains by using existing terrain data, and theterrain to be newly generated is required to adequately expresscharacteristics of the existing terrain. The terrain data selected bythe user has different resolutions from each other, and since a size ofa terrain to be newly generated may be greater than the terrain selectedby the user, characteristics of the selected terrain are required to beextracted with particularity. The present disclosure uses a patch-basedtexture synthesis method as a method of generating textures with a lowresolution to a high resolution so as to accurately extract thecharacteristics of the terrain data.

The patch-based texture synthesis is a method of selecting apredetermined size of a patch from the original image, filling a patch,which is the most similar to the selected patch, by applying a minimumerror technique, and completing a new image. Through the patch-basedtexture synthesis, a new image with a high resolution may be generatedfrom the original image with a low resolution. The new terrain may begenerated by applying the above-mentioned method to various terraindata.

A basic unit of a patch may be a rectangular form. However, therectangular form is just one example, and the basic unit of the patchmay be changed in various forms, such as a triangular or linear form.The newly generated patch is a patch that is the most similar to theprevious patch. That is, the new area is selected by calculating aminimum error with regard to the regularly overlapped area resultingfrom comparing the area to be newly generated with the already generatedareas. Hereinafter, a method of calculating a minimum error withreference to FIG. 1 is described.

I _(e) ^(m) =p−Ip _(m)

Ie _(n)=min(Ie ¹ , Ie ² , . . . , Ie ^(m))

∴Ie=min(Ie ₁ , Ie ₂ , . . . , Ie _(n))   Formula 1)

As in Formula 1, an ‘m’ indicates a patch number; an ‘n’ indicates animage number; and an ‘I’ indicates an image. A new image area Ie thathas a minimum error indicates an image min (Ie₁, Ie₂, . . . , Ie_(n))with a minimum error from among the first image area Ie₁ with a minimumerror to the n-th image area Ie_(n) with a minimum error. Here, the n-thimage Ie_(n) with the minimum error indicates a patch min (Ie¹, Ie², . .. , Ie^(m)) with a minimum error from among a newly generated firstterrain patch Ie¹ to a newly generated m-th terrain patch Ie^(m). Thenewly generated m-th terrain patch Ie^(m) indicates a patch (p−Ip_(m))that is a difference between a terrain patch p to be newly generated andthe m-th terrain patch Ip^(m) of the original terrain. By selectingpatches that are the most similar to the previous patch through theabove-mentioned process and arranging the patches in order, a finalterrain may be generated from the original terrain. Here, the generatedfinal terrain has a high resolution compared to the original terrain.

As above-mentioned, the new terrain may be generated using variousexisting terrain data. The newly generated terrain has variouscharacteristics of the existing terrain. In addition, a high resolutionterrain may be generated from a low resolution terrain model.

FIG. 5 is a diagram illustrating an example of a process of blending anawkward area regarding a synthesized terrain model.

There may be awkward parts between different terrains, in terms of a newterrain with various characteristics. To get rid of these unnaturalparts, an apparatus of processing a terrain according to an exemplaryembodiment uses a method of finding, with a curvature, a target to beblended and processing blending of the found area. The curvature iswhere a variation of the surrounding area is expressed numerically, andis used for finding a part rapidly changing. Then, the curvature is usedfor generating a soft terrain model by applying smoothing with regard tothe found area.

At this time, if simple smoothing is applied, a detailed figure maydisappear. Thus, an apparatus of processing a terrain according to anexemplary embodiment may generate a natural terrain by allocating avalue of the curvature as a weight in the smoothing.

FIGS. 6 and 7 are diagrams illustrating examples of a process forgenerating a new terrain by using multiple terrains.

Specifically, FIG. 6 illustrates a new terrain 640 generated bysynthesizing various terrains 610, 620, and 630; and FIG. 7 illustratesa new terrain 740 generated by synthesizing various terrains 710, 720,and 730. Here, a patch-based terrain generating technology with regardto various forms of a terrain is applied, and a desired terrain may begenerated from an area determined by the user.

FIG. 8 is a diagram illustrating an example of a calculation speedimprovement through parallel processing.

To generate a new terrain, multiple smoothing is required to be applied,and after the smoothing has been applied, the curvature is required tobe generated again, and for curvature and smoothing once, for example,it takes more than 15 seconds for an image with a 1024 x 1024 resolutionto be processed. To solve this, an apparatus of processing a terrainaccording to an exemplary embodiment improves its processing speed byusing Compute Unified Device Architecture (CUDA). In this case, it hasbeen checked that the time required for the smoothing and the curvatureis shortened to less than 900 ms. In an exemplary embodiment, theapparatus of processing a terrain applies a parallelization method usingCUDA to a process of calculating a minimum error to generate apatch-based new terrain.

An apparatus of processing a terrain according to an exemplaryembodiment processes a terrain in parallel through a plurality of GPUs.Generally, CPU core is expensive. Thus, if the number of cores increasesto improve a computation speed, a unit price increases. Accordingly, anapparatus of processing a terrain according to an exemplary embodimentadopts a method of increasing the number of cores for the computation ofGPU. A lot of tasks may be processed at the same time by generating manythreads by using CUDA, which is parallel-processing ApplicationProgramming Interface (API), to control these cores.

In FIG. 8 illustrates a comparison between processing by CPU and by GPUin a table, and it is assumed that a newly generated terrain resolutionis 1024×1024 and that a patch size unit is 60×60. A processing speed isshortened more than seven times in a single terrain, and more than ninetimes in multiple terrains.

FIG. 9 is a diagram illustrating an apparatus of processing a terrainaccording to an exemplary embodiment.

Referring to FIG. 9, an apparatus 1 of processing a terrain according toan exemplary embodiment includes a first database 10, a second database12, a terrain processor 14, an input 16, and an output 18. The terrainprocessor 14 includes a terrain synthesizer 140 and a blending processor142.

The first database 10 stores at least one virtual noise-based terrainmodel. The second database 12 stores at least one realistic terrainmodel. In FIG. 9, the first database 10 and the second database 12 arelimited to be located in internal memory of the apparatus 1, andhowever, may be located in an external server. In addition, in FIG. 8,the virtual noise-based terrain model and the realistic terrain modelare divided in the first database 10 and the second database 12, but maybe stored in the same space.

The terrain synthesizer 140 selects the noise-based terrain model fromthe first database 10, and the realistic terrain model from the seconddatabase 12, and generates a new terrain from the selected terrainmodel. For a selection of the model, the input 16 may receive selectioninput of the noise-based terrain model and the realistic terrain modelfrom the user.

In an exemplary embodiment, the terrain synthesizer 140 generates a newterrain through a patch-based synthesis from the original terrain bytargeting each terrain model. Here, the terrain synthesizer 140calculates a minimum error of an overlapped area between a terrain patchto be newly generated from the original terrain patch and the alreadygenerated terrain patch and arranges the terrain patch with a minimumerror in order to complete a new terrain. The terrain synthesizer 140may generate a high-resolution new terrain from the low-resolutionoriginal terrain through a patch-based synthesis.

The blending processor 142 processes a boundary part between thesynthesized terrains in the new terrain generated through the terrainsynthesizer 140. In an exemplary embodiment, the blending processor 142may include an area finder 143 and a smoothing processor 145, andfurther include a weight allocator 147.

The area finder 143 calculates a curvature numerically expressing avariation of the surrounding area by targeting a boundary area betweenthe terrains in the new terrain generated through the terrainsynthesizer 140, and finds a rapidly changing part. Then, the smoothingprocessor 145 applies the smoothing to the found area. In an exemplaryembodiment, the area finder 143 parallelizes the curvature calculationto accelerate the processing speed. The area finder 143 may use CUDA asa method for the parallel processing. The weight allocator 147 allocatesa value of the curvature as weight in applying the smoothing.

The output 18 displays the noise-based terrain model and the realisticterrain model on a screen for a user selection through the input 16.Then, the output 18 displays a new terrain image on the screen, which isgenerated through the terrain synthesizer 140 and the blending processor142. In addition, the output 18 may, on the screen, display the terrainimage that is in the synthesizing process.

In an exemplary embodiment, a method and apparatus for quicklygenerating a natural terrain may generate a natural terrain. That is,the method and apparatus may generate a new terrain with various terraincharacteristics from a virtual noise-based terrain model and a realisticterrain model, and generate a new terrain of a high-resolution, suitablefor a user's intention, by using a patch-based texture synthesis methodto thereby increase the accuracy. Moreover, the method and apparatus maygenerate a natural terrain through a blending process that uses acurvature to remove an awkward part between the synthesized terrains.

Furthermore, the method and apparatus may generate the new terrainquickly. In other words, the method and apparatus process in parallel acurvature calculation, etc., that requires a calculation quantity tothereby reduce the processing time consumed for the calculation so thata new terrain may be generated quickly.

While this invention has been particularly shown and described withreference to preferred embodiments thereof, it will be understood bythose skilled in the art that various changes in form and details may bemade therein without departing from the spirit and scope of theinvention as defined by the appended claims. The preferred embodimentsshould be considered in descriptive sense only and not for purposes oflimitation. Therefore, the scope of the invention is defined not by thedetailed description of the invention but by the appended claims, andall differences within the scope will be construed as being included inthe present invention.

What is claimed is:
 1. A method of generating terrain, comprising:generating a new terrain through a patch-based synthesis from one ormore virtual noise-based terrain models and one or more realisticterrain models; and processing blending of a boundary betweensynthesized terrains in the newly generated terrain.
 2. The method ofclaim 1, wherein the one or more noise-based terrain models are at leastone of a Perlin terrain and a fractal terrain.
 3. The method of claim 1,wherein the one or more realistic terrain models are a digital elevationmodel (DEM).
 4. The method of claim 1, wherein the generating of the newterrain utilizes a patch-based synthesis on each terrain model from anoriginal terrain, and comprises calculating a minimum error of anoverlapped area between a terrain patch to be newly generated from anoriginal terrain patch and an already generated terrain patch, andarranging, in order, a terrain patch with a minimum error to completethe new terrain.
 5. The method of claim 4, wherein the generating of thenew terrain comprises generating a high-resolution new terrain from alow-resolution original terrain through the patch-based synthesis. 6.The method of claim 4, wherein the generating of the new terraincomprises parallelizing the calculation of the minimum error toaccelerate a processing speed.
 7. The method of claim 1, wherein theprocessing of the blending comprises: finding a rapidly changing part bycalculating a curvature that numerically expresses a variation of asurrounding area by targeting the boundary between the synthesizedterrains in the newly generated terrain; and applying smoothing to thefound area.
 8. The method of claim 7, wherein the finding of the rapidlychanging part comprises parallelizing the calculation of the curvatureto accelerate a processing speed.
 9. The method of claim 8, wherein thefinding of the rapidly changing part comprises using Compute UnifiedDevice Architecture (CUDA) as a method for parallel processing.
 10. Themethod of claim 8, wherein the finding of the rapidly changing partcomprises parallel-processing through multiple Graphics Processing Units(GPUs).
 11. The method of claim 7, wherein the processing of theblending further comprises allocating a value of the curvature as weightin applying the smoothing.
 12. The method of claim 1, furthercomprising: receiving input of selection of one or more noise-basedterrain models and one or more realistic terrain models from a user. 13.An apparatus of processing a terrain, comprising: a first databaseconfigured to store one or more virtual noise-based terrain models; asecond database configured to store one or more realistic terrainmodels; a terrain synthesizer configured to select a noise-based terrainmodel from the first database, select the realistic terrain model fromthe second database, and generate a new terrain through a patch-basedsynthesis from the selected terrain models; and a blending processorconfigured to process blending of a boundary between synthesizedterrains in the newly generated terrain.
 14. The apparatus of claim 13,wherein the terrain synthesizer is configured to generate a new terrainthrough a patch-based synthesis on each terrain model from an originalterrain, and comprise calculating a minimum error of an overlapped areabetween a terrain patch to be newly generated from an original terrainpatch and an already generated terrain patch, and arranging, in order, aterrain patch with a minimum error to complete the new terrain.
 15. Theapparatus of claim 14, wherein the terrain synthesizer is configured togenerate a high-resolution new terrain from a low-resolution originalterrain through the patch-based synthesis.
 16. The apparatus of claim13, wherein the blending processor comprises: an area finder configuredto find a rapidly changing part by calculating a curvature thatnumerically expresses a variation of a surrounding area by targeting theboundary between the synthesized terrains in the newly generatedterrain; and a smoothing processor configured to apply smoothing to thefound area.
 17. The apparatus of claim 16, wherein the area finder isconfigured to parallelize the calculation of the curvature to acceleratea processing speed.
 18. The apparatus of claim 17, wherein the areafinder is configured to use CUDA as a method for parallel processing 19.The apparatus of claim 16, wherein the blending processor furthercomprises a weight allocator configured to allocate a value of thecurvature as weight in applying the smoothing.
 20. The apparatus ofclaim 13, further comprising: an input configured to receive input ofselection of one or more noise-based terrain models and one or morerealistic terrain models from a user.